#version 150 core

uniform sampler2D texture_diffuse;

uniform vec4 lightVector = normalize(vec4(0.3,-0.8,-0.9, 1));

in vec4 pass_Color;
in vec2 pass_TextureCoord;
in vec4 pass_Normal;

out vec4 out_Color;

void main(void) {
   // out_Color = pass_Color;
    // Override out_Color with our texture pixel
    float intensity = 1.1 * dot(normalize(pass_Normal), lightVector);
    if (intensity < 0.2) {
      intensity = 0.2;
    }
    if (intensity > 1.0) {
      intensity = 1.0;
    } 
    out_Color = intensity * texture(texture_diffuse, pass_TextureCoord);
}  
